from obviews.fallbacks import forms

from polls.models import *

class CreatePollFormClass(forms.ModelForm):
    class Meta:
        model = Poll
        exclude = ('slug', 'pub_date', 'ip_address', 'user')

class ModifyPollFormClass(forms.ModelForm):
    class Meta:
        model = Poll
        exclude = ('slug', 'user')

class CreateChoiceFormClass(forms.ModelForm):
    poll = forms.ModelChoiceField(queryset=Poll.objects.all(),
                                  widget=forms.HiddenInput())
    class Meta:
        model = Choice

class VoteFormClass(forms.ModelForm):
    class Meta:
        model = Vote
